﻿<%@ WebHandler Language="C#" Class="GetValue" %>

using System;
using System.Web;
using System.Data;
public class GetValue : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        string sql = context.Request.Params["sql"].ToString();
        DB DBConn = new DB();
        DataTable tb= DBConn.Get(sql);
        context.Response.CacheControl = "no-cache";
        context.Response.Write(JsonHelper.ToJson(tb).ToString());
        DBConn.mysqlcon.Close();
        context.Response.Flush();
        context.Response.End();
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}